#ifndef MYPREDICT_H
#define MYPREDICT_H
#include<opencv2/opencv.hpp>
#include<iostream>
#include "ARMOR/armor_detect.h"
#include "ARMOR/predictmove.h"
#include"my_predict/Kalman_filter.h"

#define SPEED_VECTOR_LIMIT 30


using namespace std;
using namespace cv;

struct Abs_info1
{
    double abs_last_pitch;
    double abs_last_yaw;
    vector<double> abs_pitch_vs;
    vector<double> abs_yaw_vs;
    vector<double> abs_pitch_as;
    vector<double> abs_yaw_as;

    Abs_info1()
    {
        abs_last_pitch=0;
        abs_last_yaw=0;
    }
    void clear_info();
};

struct my_predict
{
    int init_flag;
    int find_cnt;
    double pitch_out;
    double yaw_out;


    Abs_info1 abs_info;

    Kalman_filter kf_pos;
    Kalman_filter kf_v;

    my_predict();

    void init_kalman();
    void reset_predictor();
    void init_coordinate();
    void update_abs_info(double armor_pitch,double armor_yaw);
    void predict_next_pos(int drop_frame_cnt);
};


#endif
